#include "Monk.h"
#include <stdlib.h>

Monk::Monk() 
	: Character(MONK_STRENGTH_VALUE, MONK_STRENGTH_COUNTERS, MONK_CRAFT_VALUE, MONK_CRAFT_VALUE, MONK_LIVES, MONK_LIVES, MONK_FATE_VALUE, MONK_FATE_VALUE, MONK_STARTING_GOLD),
	praying(false)
{
	
}


int Monk::attackRoll()
{
	int attack = 0;
	int roll = rand() % 6 + 1;
	
	//SPECIAL ABILITY: Monk can add 1 to dice roll while praying  
	if(praying)
		roll++;

	//SPECIAL ABILITY: Inner belief adds craft value to strength during battle
	attack = roll + (getStrength() + MONK_CRAFT_VALUE); // + any other modifiers from Weapons and such

		
	return attack; 
}

int Monk::moveRoll()
{
	int roll =  rand() % 6 + 1;

	//SPECIAL ABILITY: Monk can add 1 to dice roll while praying  
	if(praying)
		roll++;

	return roll;	
}

//Start praying in order to add 1 to dice roll
void Monk::startPraying()
{
	praying = true;
}

//Stop praying after roll
void Monk::stopPraying()
{
	praying = false;
}

void Monk::announce()
{
	cout << "====== Monk ====== \nStrength: " << getStrength() << "\nCraft: " << getCraft() << " \nLives: " << getLives() << " \nFate: " << getFate() << " \nGold: " << getGold() << endl;
	if (getLives() == 0)
		cout << "Monk is dead" << endl;;
}